<template>
    <div class="settleartist">
        <!-- 标题 -->
        <div class="title tanxin">
            <div class="title_l tanxin">
                <i class="quan"></i>
                <h2>入驻歌手</h2>
            </div>
            <div class="title_r">
                <span @click="$router.push('/discover/artist/hot')">更多</span>
                <i class="jiantou"></i>
            </div>
        </div>
        <!-- 列表 -->
        <div class="artist_list">
            <ul class="tanxin">
                <li v-for="(item, index) in SettleList" :key="index" @click="$router.push(`/artlist/${item.id}`)">
                    <div class="header">
                        <img :src="item.picUrl" alt="" style="width:130px;height:130px;">
                        <i :title="item.name+'的音乐'" class="mask"></i>
                    </div>
                    <div class="info tanxin">
                        <span :title="item.name+'的音乐'" class="ellipsis">{{ item.name }}</span>
                        <i :title="item.name+'的个人主页'" class="people"></i>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
import { ArtistBangApi } from "@/request/api";
export default {
    data () {
        return {
            SettleList: "",
        }
    },
    created() {
        // 获取入驻歌手列表
        ArtistBangApi().then((res) => {
            // console.log(res);
            this.SettleList = res.data.list.artists.slice(20);
        })
    }
}
</script>
 
<style lang = "less" scoped>
@import "../../assets/base.less";
.settleartist {
    .title {
        height: 40px;
        border-bottom: 2px solid @red;
        display: flex;
        align-items: center;
        .title_l {
            .quan {
                float: left;
                width: 15px;
                height: 15px;
                margin: 5px 10px;
                background: url('../../assets/images/public/index.png') no-repeat -235px -164px;
            }
            h2 {
                font-size: 24px;
                color: #333;
                cursor: pointer;
                &:hover {
                    cursor: pointer;
                    text-decoration: underline;
                }
            }
        }
        .title_r {
            span {
                font-size: 12px;
                color: #333;
                cursor: pointer;
                &:hover {
                    cursor: pointer;
                    text-decoration: underline;
                }
            }
            .jiantou {
                float: right;
                width: 12px;
                height: 12px;
                margin: 5px;
                background: url('../../assets/images/public/index.png') no-repeat 0 -242px;
            }
        }
    }
    .artist_list {
        ul {
            flex-wrap: wrap;
            display: flex;
            justify-content: space-between !important;
            padding-bottom: 30px;
        }
        li {
            width: 130px;
            height: 150px;
            margin-top: 20px;
            &:nth-of-type(5n) {
                margin-right: 0;
            }
            .header {
                position: relative;
                height: 130px;
                width: 130px;
                overflow: hidden;
                .mask {
                    cursor: pointer;
                    position: absolute;
                    top: 0;
                    left: 0;
                    height: 130px;
                    width: 130px;
                    background: url("../../assets/images/public/coverall.png") no-repeat -10px 0px;
                }
                &:hover {
                    img {
                        transform: scale(1.2);
                    }
                }
            }
            .info {
                padding-top: 5px;
                font-size: 12px;
                display: flex;
                align-items: center;
                span {
                    &:hover {
                        cursor: pointer;
                        text-decoration: underline;
                    }
                }
                .people {
                    cursor: pointer;
                    width: 18px;
                    height: 18px;
                    display: block;
                    background: url("../../assets/images/public/icon.png") no-repeat 0px -739px;
                }
            }
        }
    }
}
</style>